package game;


import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;

/**
 * 
 * @author Administrador
 */
public class pista extends javax.swing.JFrame {
	private Image imgFondo;
	private int posX;
	private int posY;
	private Thread T;
	private int delay;

	/** Creates new form pista */
	public pista() {
		initComponents();
		posX = 0;
		posY = 0;
		delay = 100;
	}

	public void Pintar() {
		imgFondo = Toolkit.getDefaultToolkit().getImage("imagenes/pistaa.jpg");
		repaint();
	}

	public void paint(Graphics g) {
		try {

			g.drawImage(imgFondo, 0, 0, this);

			Thread.currentThread().sleep(0);
		} catch (InterruptedException e) {
			System.out.println(e);
		}
	}

	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
	// <editor-fold defaultstate="collapsed"
	// desc=" Generated Code ">//GEN-BEGIN:initComponents
	private void initComponents() {

		setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
		setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
		addMouseListener(new java.awt.event.MouseAdapter() {
			public void mouseClicked(java.awt.event.MouseEvent evt) {
				mouseClicked(evt);
			}
		});
		pack();
	}// </editor-fold>//GEN-END:initComponents

	public void update(Graphics g) {
		paint(g);
	}

	/**
	 * @param args
	 *            the command line arguments
	 */
	public static void main(String args[]) {
		java.awt.EventQueue.invokeLater(new Runnable() {
			public void run() {
				new pista().setVisible(true);
			}
		});
	}
}
